import request from "@/utils/request";

export default {
  updateOrAdd(selected, selectedId, questionStatus) {
    const data = { selected, selectedId };
    if (questionStatus) {
      data.questionStatus = JSON.stringify(questionStatus);
    }
    return request({
      url: `/selectRecord/updateOrAdd`,
      method: "post",
      data,
    });
  },
  getBySelectId(selectedId) {
    return request({
      url: `/selectRecord/getBySelectId/${selectedId}`,
      method: "get",
    });
  },
};
